r19813 by craig - #12560: Fix when loading new doc when Picture Browser is open
scribus-commit
scribus-commit at lists.scribus.net
Wed Feb 11 19:02:04 UTC 2015
Author: craig
Date: Wed Feb 11 19:02:04 2015
New Revision: 19813
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19813
Log:
#12560: Fix when loading new doc when Picture Browser is open
Modified:
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19813&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp Wed Feb 11 19:02:04 2015
@@ -36,6 +36,7 @@
//load settings
pbSettings.load();
+ documentChanged = false;
connect ( navigationBox, SIGNAL ( currentIndexChanged ( int ) ), this, SLOT ( navigate ( int ) ) );
connect ( sortCombobox, SIGNAL ( currentIndexChanged ( int ) ), this, SLOT ( sortChanged ( int ) ) );
@@ -588,10 +589,10 @@
void PictureBrowser::dirChosen ( const QModelIndex &index )
{
// as long as the folder doesnt change, only the first signal (click, doubleclick or activated) is processed
- if ( !tmpindex.isValid() || ( tmpindex != index ) )
+ if ( documentChanged || !tmpindex.isValid() || ( tmpindex != index ) )
{
tmpindex = index;
-
+ documentChanged = false;
currPath = folderModel.filePath ( index );
if ( !fit )
@@ -1681,6 +1682,8 @@
updateDocumentbrowser();
actionsGoButton->setEnabled ( true );
insertImageButton->setEnabled ( true );
+ documentChanged=true;
+ dirChosen(folderModel.index( QDir::currentPath() ));
}
void PictureBrowser::closedDocument()
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19813&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.h Wed Feb 11 19:02:04 2015
@@ -260,6 +260,8 @@
//contains the hierarchy for the collectionsbrowser treewidget
QList<collections *> collectionsDb;
+
+ bool documentChanged;
};
More information about the scribus-commit
mailing list