r23977 by jghali - More natural behavior when deleting Table of Content items
scribus-commit
scribus-commit at lists.scribus.net
Sun Aug 9 10:17:18 UTC 2020
Author: jghali
Date: Sun Aug 9 10:17:18 2020
New Revision: 23977
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23977
Log:
More natural behavior when deleting Table of Content items
Modified:
trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
Modified: trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23977&path=/trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp Sun Aug 9 10:17:18 2020
@@ -303,15 +303,15 @@
QSignalBlocker sigBlocker(tocListBox);
updateToCListBox();
- if (numberSelected > 0)
- {
- tocListBox->setCurrentRow(numberSelected - 1);
- selectToC(numberSelected - 1);
- }
- else if (numberSelected == 0 && localToCSetupVector.count() > 0)
- {
- tocListBox->setCurrentRow(0);
- selectToC(0);
+ if (numberSelected < localToCSetupVector.count())
+ {
+ tocListBox->setCurrentRow(numberSelected);
+ selectToC(numberSelected);
+ }
+ else if (localToCSetupVector.count() > 0)
+ {
+ tocListBox->setCurrentRow(localToCSetupVector.count() - 1);
+ selectToC(localToCSetupVector.count() - 1);
}
enableGUIWidgets();
}
More information about the scribus-commit
mailing list