[rkward-cvs] SF.net SVN: rkward:[2838] trunk/rkward/rkward/windows/rkworkplace.cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Wed Apr 21 17:02:10 UTC 2010
Revision: 2838
http://rkward.svn.sourceforge.net/rkward/?rev=2838&view=rev
Author: tfry
Date: 2010-04-21 17:02:09 +0000 (Wed, 21 Apr 2010)
Log Message:
-----------
Fix detection of already opened (duplicate) script files
Modified Paths:
--------------
trunk/rkward/rkward/windows/rkworkplace.cpp
Modified: trunk/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkworkplace.cpp 2010-04-21 14:49:14 UTC (rev 2837)
+++ trunk/rkward/rkward/windows/rkworkplace.cpp 2010-04-21 17:02:09 UTC (rev 2838)
@@ -221,19 +221,18 @@
// is this url already opened?
if (!url.isEmpty ()) {
- for (RKWorkplaceObjectList::const_iterator it = windows.constBegin (); it != windows.constEnd (); ++it) {
- if ((*it)->type == RKMDIWindow::CommandEditorWindow) {
- KUrl ourl = static_cast<RKCommandEditorWindow *> (*it)->url ();
- if (url == ourl) {
- (*it)->activate ();
- return true;
- }
- }
+ RKWorkplaceObjectList script_windows = getObjectList (RKMDIWindow::CommandEditorWindow, RKMDIWindow::AnyWindowState);
+ for (RKWorkplaceObjectList::const_iterator it = script_windows.constBegin (); it != script_windows.constEnd (); ++it) {
+ KUrl ourl = static_cast<RKCommandEditorWindow *> (*it)->url ();
+ if (url == ourl) {
+ (*it)->activate ();
+ return true;
+ }
}
}
RKCommandEditorWindow *editor = new RKCommandEditorWindow (view (), use_r_highlighting);
-
+
if (!url.isEmpty ()) {
if (!editor->openURL (url, encoding, use_r_highlighting, read_only)) {
delete editor;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list