mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 08:28:44 +00:00
Fixed: geqt correctly handles in the FileOpenDialog of cancel action and empty icon
This commit is contained in:
parent
1af3224bc9
commit
dc07038a82
2 changed files with 13 additions and 4 deletions
|
@ -222,7 +222,7 @@ namespace NLQT
|
||||||
{
|
{
|
||||||
|
|
||||||
COFile file;
|
COFile file;
|
||||||
std::string s = CPath::lookup(loadedForm.toStdString());
|
std::string s = CPath::lookup(loadedForm.toStdString(), false);
|
||||||
if (file.open (s))
|
if (file.open (s))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -323,6 +323,8 @@ namespace NLQT
|
||||||
path,
|
path,
|
||||||
"Images (*.png *.tga)"
|
"Images (*.png *.tga)"
|
||||||
);
|
);
|
||||||
|
if (file.isNull())
|
||||||
|
return;
|
||||||
QFileInfo info = QFileInfo(file);
|
QFileInfo info = QFileInfo(file);
|
||||||
|
|
||||||
// TODO?
|
// TODO?
|
||||||
|
|
|
@ -184,11 +184,18 @@ namespace NLQT
|
||||||
if (Modules::objViewInt())
|
if (Modules::objViewInt())
|
||||||
{
|
{
|
||||||
QIcon *icon = Modules::objViewInt()->saveOneImage(value.toStdString());
|
QIcon *icon = Modules::objViewInt()->saveOneImage(value.toStdString());
|
||||||
|
if (icon)
|
||||||
|
{
|
||||||
if(icon->isNull())
|
if(icon->isNull())
|
||||||
return QIcon(":/images/pqrticles.png");
|
return QIcon(":/images/pqrticles.png");
|
||||||
else
|
else
|
||||||
return QIcon(*icon);
|
return QIcon(*icon);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return QIcon();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(value.contains(".tga") || value.contains(".png"))
|
else if(value.contains(".tga") || value.contains(".png"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue