summaryrefslogtreecommitdiffstats
path: root/libkcal/resourcecached.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkcal/resourcecached.cpp')
-rw-r--r--libkcal/resourcecached.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp
index 2fecbb50f..3b654aef3 100644
--- a/libkcal/resourcecached.cpp
+++ b/libkcal/resourcecached.cpp
@@ -46,6 +46,8 @@
using namespace KCal;
+static bool m_editoropen = false;
+
ResourceCached::ResourceCached( const KConfig* config )
: ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
mReloadPolicy( ReloadNever ), mReloadInterval( 10 ),
@@ -584,10 +586,23 @@ void ResourceCached::disableChangeNotification()
mCalendar.unregisterObserver( this );
}
+bool ResourceCached::editorWindowOpen()
+{
+ return m_editoropen;
+}
+
+void ResourceCached::setEditorWindowOpen(bool open)
+{
+ m_editoropen = open;
+}
+
void ResourceCached::slotReload()
{
if ( !isActive() ) return;
+ // Make sure no editor windows are open
+ if (editorWindowOpen() == true) return;
+
kdDebug(5800) << "ResourceCached::slotReload()" << endl;
load();